import { useHistory } from "@/hooks/useHistory";
import { useIntl } from "react-intl";
import { Button, Result } from "antd";
import React from "react";

export const NotPermission: React.FC = () => {
  const history = useHistory();
  return (
    <Result
      status="403"
      title="403"
      subTitle={useIntl().formatMessage({ id: "pages.403.subTitle" })}
      extra={
        <Button type="primary" onClick={() => history.push("/")}>
          {useIntl().formatMessage({ id: "pages.403.buttonText" })}
        </Button>
      }
    />
  );
};

export default NotPermission;
